import java.io.*;
import java.util.*;

public class Main
{
   public static void main(String[] args)
   {
      Scanner in = new Scanner(System.in);
      PrintWriter out = new PrintWriter(System.out);

      int n = in.nextInt();
      int c = 6;
      while (c<1000000) {
        c += 1;
        out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");

out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");
        out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");

out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");
out.print("456442312123233132322312313111111");
      };
      for (int i=0; i<n; i++){
         c = in.nextInt();
         if ((c%2)>0) out.print(c+2+" ");
         else  out.print(c+" ");
      }
      

      out.flush();
   }
}
